package lec04.pm.gm.v2;

import java.util.Arrays;
import java.util.Random;


public class TestPoint {
	private static final int RAND_RANGE = 100;
	public static void main(String[] args) {
		Random random = new Random();
		Point[] points = new Point[100];
		for (int i = 0; i < points.length; i++) {
			Point p = new Point();
			p.setX(random.nextInt(RAND_RANGE));
			p.setY(random.nextInt(RAND_RANGE));
			points[i]=p;
		}
		for (Point point : points)
			System.out.println(point);
		Arrays.sort(points);
		System.out.println("After sorted:");
		for (Point point : points)
			System.out.println(point);

	}
}
